package demo2;

public class Test2 {
     public static void main(String[] args) {
        MySingeList mySingeList1 = new MySingeList();
        mySingeList1.addFirst(12);
        mySingeList1.addFirst(23);
        mySingeList1.addFirst(34);
        mySingeList1.addFirst(45);
        mySingeList1.addFirst(56);
//        mySingeList1.show1(mySingeList1.head);
        mySingeList1.show2();

    }
    public static void main1(String[] args) {
        MySingeList mySingeList = new MySingeList();
        mySingeList.creatList();
        mySingeList.show();
        System.out.println("dyegfiurfyri");
        System.out.println(mySingeList.contains(12));
        System.out.println(mySingeList.contains(23));
        System.out.println(mySingeList.contains(34));
        System.out.println(mySingeList.contains(45));
        System.out.println(mySingeList.contains(56));
        System.out.println(mySingeList.contains(112));
        mySingeList.addFirst(99);
        mySingeList.addLast(101);
        mySingeList.show();
        mySingeList.addIndex(3,77);
        mySingeList.show();
        mySingeList.addIndex(0,88);
        mySingeList.show();
        mySingeList.addIndex(9,99);
        mySingeList.show();
//        mySingeList.remove(99);
//        mySingeList.show();
//        mySingeList.remove(110);
//        mySingeList.show();

        mySingeList.reverseList();
        mySingeList.show(); 
        mySingeList.removeAllKey(99);
        mySingeList.show();
        mySingeList.removeAllKey(88);
        mySingeList.show();
        System.out.println("清空链表：");
        mySingeList.show();



//        mySingeList.addIndex(10,77);
//        mySingeList.show();

    }
}
